#ifndef APPLICATION_H
#define APPLICATION_H

#include <vector>
#include <cstdio>

#include <QtGui>
#include <QApplication>
#include <QMainWindow>

#include "canvas.h"
#include "scene.h"

using namespace TUIO;

class MainWindow : public QMainWindow{
    private:
        vector<QGLCanvas*> canvas;

    public:
        MainWindow(){}
        ~MainWindow(){}
    
        void setTitle(char* title){     
            this->setWindowTitle(tr(title)); 
        }
        
        void resizeWindow(int width, int height){
            this->resize(width, height);
            this->canvas->resizeCanvas(width, height);
        }

        void setLayout(){
        
        }

        void addCanvas(QGLCanvas *canvas){ 
            this->canvas.push_back(canvas);
            this->setCentralWidget(canvas); 
        }
};

class Application : public QApplication {
    private:
        MainWindow *window;

    public:
        Application(int &argv, char **args):QApplication(argv, args){
            window = new QWindow();
        }
        ~Application(){}
        
        MainWindow* getWindow(){
            return this->window;
        }
        
        void run(){
            this->window->show();
            this->exec();
        }
};

#endif /* APPLICATION_H */
